1. Field of the Invention
The present invention relates generally to software and computer systems.
2. Description of the Background Art
A program environment typically includes an array of environment variables that are made available when a process begins. A general purpose of such environment variables is to customize or tune the dynamic behavior of the programs in which they are used. For example, the C/C++ programming language provides the ability to adjust a program's run-time behavior through the use of environment variables.
Environment variables may be queried by an application, such that the behavior of the application varies based on their values. As such, environment variables provide a static mechanism for tuning user-space components.
There are problems and limitations, however, in using environment variables to perform dynamic tuning of user-space components. Dynamic tuning of user-space components refers to modifying the behavior of a user-space process after startup time, i.e. while the process is executing.
Environment variables are generally effective for all programs running in an environment. In other words, modifying an environment variable affects the behavior of all programs using that variable in the environment. Hence, an environment variable cannot be used to dynamically tune a specific instance of an application without affecting other executing programs which also use that same variable.
Besides environment variables, another technique for dynamic tuning of user-space components involves allocating a shared memory segment at startup time by the process to be tuned. Subsequently, a tool program may connect to the shared memory segment to modify configuration data therein for the purpose of the dynamic tuning. Unfortunately, allocating shared memory segments is expensive in terms of resources. Furthermore, this solution is not well suited for system shared libraries.
Yet another technique for dynamic tuning in user-space may be to send some signal that causes a signal handler in user-space to read the configuration data. However, this solution leads to the restriction that these signals cannot be used for other (“real”) application needs. Moreover, this solution is not practical for system shared libraries.